package com.spic.business.datamanagement.violation.controller;

import com.spic.business.datamanagement.violation.domain.ViolationActionInputDirty;
import com.spic.business.datamanagement.violation.service.IViolationActionInputDirtyService;
import com.spic.common.core.web.controller.BaseController;
import com.spic.common.core.web.domain.AjaxResult;
import com.spic.common.core.web.page.TableDataInfo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;
import java.util.Map;

import static com.spic.business.xfalarm.PageUtils.startPage;

/**
 * 违章行为录入Controller
 * 
 * @author ruoyi
 * @date 2022-11-26
 */
@RestController
@RequestMapping("/violation/action/dirty")
public class ViolationActionInputDirtyController extends BaseController
{
    @Autowired
    private IViolationActionInputDirtyService violationActionInputDirtyService;

    @GetMapping("/list")
    public TableDataInfo list(ViolationActionInputDirty violationActionInputDirty)
    {
        startPage();
        List<ViolationActionInputDirty> list = violationActionInputDirtyService.selectViolationActionInputDirtyList(violationActionInputDirty);
        return getDataTable(list);
    }

    @GetMapping("statistics")
    public AjaxResult statistics() {
        Map<String, Integer> map = violationActionInputDirtyService.statistics();
        return AjaxResult.success(map);
    }



}
